<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<script type="text/javascript" charset="utf-8"
		src="<%=basePath%>ueditor/editor_all.js"></script> 
<script type="text/javascript" charset="utf-8"
		src="<%=basePath%>ueditor/lang/zh-cn/zh-cn.js"></script>
<script type="text/javascript" charset="utf-8"
		src="<%=basePath%>ueditor/editor_config.js"></script>
<div id='message'>
   
</div>
<form action="<%=basePath %>backend/updatexxydxx" class='form-horizontal' method="post" id='xyForm' enctype="multipart/form-data">

	<div class="row div-common" style='margin-top: 10px;'>

		<!-- Optional: clear the XS cols if their content doesn't match in height -->
		<div class="span5 input-prepend"
			>
			<span class="add-on">名 称</span> 
			<input  name="xyydName" value='${xxyd.xyydName }'
				type="text" />

		</div>

		<span></span>
		<div class="span5 input-prepend"
			>
			<span class="add-on">类 型</span> <select class="span6"
				name='xxydtype' id='xxydtype'>
				<option value='0'>---请选择---</option>
				<c:forEach items="${ xxydtypes}" var="xxydtype">
					<option value="${xxydtype.xyydtypeId }">${xxydtype.xyydtypeName
						}</option>
				</c:forEach>
			</select>

		</div>
	</div>

	
	<div class='row'>
		<div class='row' style='margin-top: 10px; margin-left: 40px;'>
			<div class="span5 control-group">
				<label class="control-label">概况（简介）:</label>
				<div class='controls'>
					<textarea class="text-area" name='xyydtGk' id='xxydgk'></textarea>
				</div>
			</div>
		</div>


		<div class='div-common'>
			<strong>内容</strong><br>
			<br>
			<script id="editor"></script>
		</div>

		<input type="submit" value="完成"
			style="margin-left: 500px; margin-top: 10px;" class="btn btn-info"
			onclick="return getContent();" />
	</div>
	<input id="content1" type="hidden" name="xyydtIntro" value='${xxyd.xyydtIntro }'>
		<input id='xxydtype1' name='belong' type="hidden" value='${xxyd.xyydtId.xyydtypeId }' > 
		<input id='xxydgk1' name='belong' type="hidden" value='${xxyd.xyydtGk }' > 
		<input  name='xyydId' type="hidden" value='${xxyd.xyydId }' > 
	</form>
	
	<script type="text/javascript">
	var editor = new UE.ui.Editor();
    editor.render("editor");
    $(function(){
		var content = $("#content1").val();
	
         editor.ready(function(){
           editor.setContent(content);
          });
    });
    $("#xxydtype").val($("#xxydtype1").val());
   
    $("#xxydgk").val($("#xxydgk1").val());
  
	var ue = UE.getEditor('editor');
    function getContent() {
        var str= ue.getContent();
        $("#content1").val(str);
        var str="";
       return true;
    }
</script>
